package android_design_mode.chapter17_mediator.computer_mediator.parts;

import android_design_mode.chapter17_mediator.computer_mediator.Colleague;
import android_design_mode.chapter17_mediator.computer_mediator.Mediator;

public class CPU extends Colleague {
    private String dataVideo, dataSound;


    public CPU(Mediator mediator) {
        super(mediator);
    }

    public String getDataSound() {
        return dataSound;
    }

    public String getDataVideo() {
        return dataVideo;
    }

    public void decodeData(String data) {
        String[] tmp = data.split(",");
        dataSound = tmp[0];
        dataVideo = tmp[1];

        mediator.change(this);
    }
}
